package es.udima.geo.geoserver.persistence;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class GenericDAO {

    private static final String PERSISTENCE_UNIT_NAME = "GeoUdimaServer";
    
    public GenericDAO(){}
    
    protected EntityManager createEntityManager() {
	EntityManagerFactory factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);
	EntityManager em = factory.createEntityManager();
	return em;
    }
}
